package com.robotserver.orders.entity;

import java.io.Serializable;

/**
 * 抖音token
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2023-04-17 11:08:53
 */
public class DyTokens extends BaseEntity {
	@Override
	protected Serializable pkVal() {
		return this.getId();
	}

	/**
	 * 名称
	 */
	private String name;

	/**
	 * AppId
	 */
	private String appId;

	/**
	 * 授权token
	 */
	private String accessToken;
	/**
	 * 授权到期时间
	 */
	private Integer exptime;
	/**
	 * 心跳
	 */
	private Integer heartbeat;

	/**
	 * 联盟类型（0-抖客联盟；1-穿山甲联盟）
	 */
	private Integer  tokenType;

	//下面字段不是数据库字段，是临时字段，方便业务使用
	private Long beginTime;  //查询开始时间
	private Long endTime;    //查询结束时间
	private int type;        ////订单时间查询类型(1-付款时间 4-更新时间)

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	public Integer getExptime() {
		return exptime;
	}

	public void setExptime(Integer exptime) {
		this.exptime = exptime;
	}

	public Integer getHeartbeat() {
		return heartbeat;
	}

	public void setHeartbeat(Integer heartbeat) {
		this.heartbeat = heartbeat;
	}

	@Override
	public Integer getCreateTime() {
		return createTime;
	}

	@Override
	public void setCreateTime(Integer createTime) {
		this.createTime = createTime;
	}

	@Override
	public Integer getUpdateTime() {
		return updateTime;
	}

	@Override
	public void setUpdateTime(Integer updateTime) {
		this.updateTime = updateTime;
	}

	public Long getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Long beginTime) {
		this.beginTime = beginTime;
	}

	public Long getEndTime() {
		return endTime;
	}

	public void setEndTime(Long endTime) {
		this.endTime = endTime;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Integer getTokenType() {
		if(tokenType == null){
			tokenType = 0;   //默认为抖客账号
		}
		return tokenType;
	}

	public void setTokenType(Integer tokenType) {
		this.tokenType = tokenType;
	}
}
